package org.poem.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * Created by poem on 2017/8/30.
 * 指定properties文件的位置
 */
@Component
@ConfigurationProperties(prefix = "redis")
//@ConfigurationProperties(prefix = "redis", locations = "classpath:properties/redis.properties")1.4一下的配置是这样的
@PropertySource(encoding = "UTF-8",ignoreResourceNotFound = false,value = "classpath:properties/redis.properties")
public class RedisConfigSetting {

    private String port;

    private String host;

    private String password;

    public String getPort() {
        return port;
    }

    public void setPort(String port) {
        this.port = port;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
